package com.example.takeaway.model.bo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.takeaway.model.bo.BaseBO;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单项表
 * </p>
 *
 * @author 邢晨旭
 * @since 2023-10-12
 */
@Getter
@Setter
@TableName("order_item")
public class OrderItem extends BaseBO {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单ID（关联`order`表）
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 菜品ID（关联`dish`表）
     */
    @TableField("dish_id")
    private Long dishId;

    @TableField("dish_name")
    private String dishName;

    /**
     * 图片
     */
    @TableField("image")
    private String image;

    /**
     * 规格
     */
    @TableField("specification")
    private String specification;

    /**
     * 数量
     */
    @TableField("quantity")
    private Integer quantity;

    /**
     * 金额
     */
    @TableField("amount")
    private BigDecimal amount;
}
